home *** CD-ROM | disk | FTP | other *** search
- package sun.awt.image;
-
- import java.io.BufferedInputStream;
- import java.io.FileInputStream;
- import java.io.FileNotFoundException;
-
- public class FileImageSource extends InputStreamImageSource {
- String imagefile;
-
- public FileImageSource(String filename) {
- SecurityManager security = System.getSecurityManager();
- if (security != null) {
- security.checkRead(filename);
- }
-
- this.imagefile = filename;
- }
-
- final boolean checkSecurity(Object context, boolean quiet) {
- return true;
- }
-
- protected ImageDecoder getDecoder() {
- BufferedInputStream is;
- try {
- is = new BufferedInputStream(new FileInputStream(this.imagefile));
- } catch (FileNotFoundException var2) {
- return null;
- }
-
- return ((InputStreamImageSource)this).getDecoder(is);
- }
- }
-